package com.neusoft.mapper;

import com.neusoft.domain.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface OrderMapper {

    List<Order> pageSelectOrder(@Param("userId") String userId,@Param("businessId") Integer businessId);
    @Update("update orders set orderStatus=#{orderStatus} where orderId=#{orderId}")
    void changeOrderStatus(@Param("orderId") Integer orderId, @Param("orderStatus") Integer orderStatus);
    @Select("select * from orders where orderId=#{orderId}")
    Order getOrdersById(Integer orderId);
    @Select("select * from orders where businessId=#{id}")
    List<Order> getOrdersByBusinessId(Integer id);
}
